package com.atguigu.client;

import com.atguigu.entity.CartInfo;
import com.atguigu.entity.OrderInfo;
import com.atguigu.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Description
 * @Author: TT
 * @Date: 2022/8/5 19:26
 */
@FeignClient(value = "shop-order")
public interface OrderFeignClient {
    //1.订单的确认信息
    @GetMapping("/order/confirm")
    public RetVal confirm();
    //2.根据订单id查询订单信息
    @GetMapping("/order/getOrder/{orderId}")
    public OrderInfo getOrder(@PathVariable Long orderId);
    //3.保存订单及详情
    @PostMapping("/order/saveOrderWithDetail")
    public Long saveOrderWithDetail(@RequestBody OrderInfo orderInfo);
}
